# Capacitor Monitor GUI Launcher
Write-Host "Starting Capacitor Monitor GUI..." -ForegroundColor Green

try {
    # Check if Python is available
    $pythonVersion = python --version 2>&1
    if ($LASTEXITCODE -ne 0) {
        Write-Host "Error: Python is not installed or not in PATH" -ForegroundColor Red
        Write-Host "Please install Python from https://www.python.org/downloads/" -ForegroundColor Yellow
        pause
        exit 1
    }
    
    Write-Host "Python version: $pythonVersion" -ForegroundColor Cyan
    
    # Install dependencies if needed
    Write-Host "Checking dependencies..." -ForegroundColor Yellow
    pip install -r requirements.txt
    
    # Run the GUI
    Write-Host "Launching GUI..." -ForegroundColor Green
    python capacitor_monitor_gui.py
    
} catch {
    Write-Host "Error running GUI: $_" -ForegroundColor Red
    pause
} 